/*
 * Copyright (C) 2017 Baidu, Inc. All Rights Reserved.
 */
package com.mitgroup.dmrvs.utils;

import java.io.File;

import android.content.Context;
import android.os.Environment;

public class FileUtil {
    public static File getSaveFile() {
        File file = new File(Environment.getExternalStorageDirectory()+"/dmrvs", "pic.jpg");
        return file;
    }
    public  static void deleteFile(File file) {
        if (file.isDirectory()) {
            File[] files = file.listFiles();
            for (int i = 0; i < files.length; i++) {
                File f = files[i];
                deleteFile(f);
            }
            //file.delete();//如要保留文件夹，只删除文件，请注释这行
        } else if (file.exists()) {
            file.delete();
        }
    }

}
